package top.dreamlove.demo.lambdaStudy;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

interface MathOperation {
    /**
     * 计算和
     * @param a 数字A
     * @param b 数字B
     * @return 相加结果
     */
    int operation(int a, int b);

    // //计算相乘
    // int multi(int a,int b);
}


public class One {

    public static void main(String[] args) {
        List<Integer> list = Arrays.asList(1, 2, 3, 4, 5);
        list.forEach(System.out::println);
        // list.forEach();
        // MathOperation mathOperation = (a,b) -> {
        //     System.out.println(112);
        //     return a + b;
        // };
        // int num = mathOperation.operation(1,2);
        // System.out.println("num = " + num);
    }
}